import 'package:daoyi_admin_ui_getx/app/data/cache_keys.dart';
import 'package:daoyi_admin_ui_getx/app/modules/auth/controllers/auth_controller.dart';
import 'package:daoyi_admin_ui_getx/app/routes/app_pages.dart';
import 'package:daoyi_admin_ui_getx/generated/locales.g.dart';
import 'package:flustars/flustars.dart';
import 'package:flutter/material.dart';

import 'package:get/get.dart';

import '../controllers/user_center_controller.dart';

class UserCenterView extends GetView<UserCenterController> {
  const UserCenterView({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(LocaleKeys.titles_UserCenterView.tr),
        centerTitle: true,
      ),
      body: Center(
        child: ElevatedButton(
            onPressed: () async {
              await SpUtil.putBool(CacheKeys.authIsLogin, false);
              Get.offNamed(Routes.LOGIN);
            }, child: Text(LocaleKeys.buttons_logout.tr),),
      ),
    );
  }
}
